<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Assigns a name to a result set</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.ibase-name-result" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ibase_name_result</h1>
  <p class="verinfo">(PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">ibase_name_result</span> &mdash; <span class="dc-title">Assigns a name to a result set</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.ibase-name-result-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ibase_name_result</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$result</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   ) : <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   This function assigns a name to a result set. This name can be used later in
   UPDATE|DELETE ... WHERE CURRENT OF <code class="parameter">name</code> statements.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ibase-name-result-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">result</code></dt>

     <dd>

      <p class="para">
       An InterBase result set.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">name</code></dt>

     <dd>

      <p class="para">
       The name to be assigned.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ibase-name-result-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.ibase-name-result-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-1200">
    <p><strong>Example #1 <span class="function"><strong>ibase_name_result()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$result&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ibase_query</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT&nbsp;field1,field2&nbsp;FROM&nbsp;table&nbsp;FOR&nbsp;UPDATE"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">ibase_name_result</span><span style="color: #007700">(</span><span style="color: #0000BB">$result</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"my_cursor"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$updateqry&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ibase_prepare</span><span style="color: #007700">(</span><span style="color: #DD0000">"UPDATE&nbsp;table&nbsp;SET&nbsp;field2&nbsp;=&nbsp;?&nbsp;WHERE&nbsp;CURRENT&nbsp;OF&nbsp;my_cursor"</span><span style="color: #007700">);<br /><br />for&nbsp;(</span><span style="color: #0000BB">$i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">ibase_fetch_row</span><span style="color: #007700">(</span><span style="color: #0000BB">$result</span><span style="color: #007700">);&nbsp;++</span><span style="color: #0000BB">$i</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">ibase_execute</span><span style="color: #007700">(</span><span style="color: #0000BB">$updateqry</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$i</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ibase-name-result-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="ibase_prepare.html" class="function" rel="rdfs-seeAlso">ibase_prepare()</a> - Prepare a query for later binding of parameter placeholders and execution</span></li>
    <li class="member"><span class="function"><a href="ibase_execute.html" class="function" rel="rdfs-seeAlso">ibase_execute()</a> - Execute a previously prepared query</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>